<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\grid\GridView;

/* @var $this yii\web\View */
/* @var $model app\models\Company */

$this->title = $model->name;
//$this->params['breadcrumbs'][] = ['label' => '公司', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="company-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('删除', ['delete', 'id' => $model->id], [
            'class' => 'btn btn-danger',
            'data' => [
                'confirm' => 'Are you sure you want to delete this item?',
                'method' => 'post',
            ],
        ]) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
           // 'id',
            'code',
            'name',
            'addr',
            'introduction:ntext',
            [
                'label'=>'负责人',
                'value'=>$model->pricipal->name,
            ],
            'tel',
            'email:email',
            'comment',
            // 'qualification_image',
        ],
    ]) ?>

    <?= Html::a('新增园区', ['park/create','id'=>$model->id], ['class' => 'btn btn-success']) ?>

    <?= GridView::widget([
        'dataProvider' => $dataProvider,
        //'filterModel' => $searchModel,
        'columns' => [
            ['class' => 'yii\grid\SerialColumn'],
            'code',
            'name',
            'addr',



            ['class' => 'yii\grid\ActionColumn',
                'controller'=>'park'
            ],
        ],
    ]); ?>

</div>
